<template>
  <div class="model-form">
    <el-page-header @back="goBack" content="详情">
    </el-page-header>
    <el-form class="viewForm" label-width="80px">
      <el-col :span="22">
        <el-form-item label="广告名称">
          <div v-html="viewModel.title"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="广告位">
          <div v-html="viewModel.adPositionName"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="广告图片">
          <div v-html="viewModel.path"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="广告开始时间">
          <div v-html="viewModel.beginDate"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="广告结束时间">
          <div v-html="viewModel.endDate"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="链接地址">
          <div v-html="viewModel.url"></div>
        </el-form-item>
      </el-col>
      <el-col :span="22">
        <el-form-item label="内容">
          <div v-html="viewModel.note"></div>
        </el-form-item>
      </el-col>
    </el-form>
  </div>
</template>

<script>
import common from "@/mixins/common.js";

export default {
  name: "ad_view",
  mixins: [common],
  data() {
    return {
      viewModel: {},
      activeIndex: "1"
    }
  },
  async mounted() {
    let id = this.$route.query.id;
    let data = {};
    data.id = id;
    let res = await this.$http.post("/ad/view", data);
    if (res.code === 200) {
      this.viewModel = res.data;
    }
  }
}
</script>

<style scoped>

</style>
